import request from '@/utils/request'
// home 页数据
export const getHomeLists = () => request({ url: '/index/index' })
// search 组件数据
export const getSearchLists = () => request({ url: '/search/index' })
// 搜索框商品搜索
export const getGoodsList = (params) => request({ url: '/goods/list', params })
// 清空历史记录
export const clearHistory = () => request({ url: '/search/clearhistory', method: 'post' })
// 搜索hotlist
export const getHotList = (params) => request({ url: '/search/helper', params })
// 获取分类列表
export const getCategoryList = (params) => request({ url: '/goods/category', params })
// 获取分类商品列表
export const getCategoryGoodsList = (params) => request({ url: '/goods/list', params })
// 获取品牌详情
export const getBrandInfo = (params) => request({ url: '/brand/detail', params })
// 获取品牌商品列表
export const getBrandList = (params) => request({ url: '/goods/list', params })
// 获取商品详情
export const getGoodsDetalis = (params) => request({ url: '/goods/detail', params })
// 相关产品
export const getGoodsRelated = (params) => request({ url: '/goods/related', params })
// 获取购物车 商品数量
export const getGoodsCount = () => request({ url: '/cart/goodscount' })
// 加入购物车
export const addGoodsCart = (data) => request({ url: '/cart/add', method: 'post', data })
